package Test;

public class SubCar extends Car{
    public SubCar(String mark, int price, int spead) {
        super(mark);
        this.price = price;
        this.spead = spead;
        System.out.println( "本车的品牌是：" + this.mark);
        System.out.println(this.mark + "的价格是："  + this.price);
        super.drive();
        System.out.println(this.mark + "原来的速度是：" + this.spead);
    }

    int price;//价格

    int spead;//速度
    public void speedChange(int newSpeed){
        this.spead = newSpeed;
        System.out.println(this.mark + "现在的速度是：" + newSpeed);
    }

}
